GtkWindow: Manually set CSD should enable shadow width calculation
authorJonas Ådahl <jadahl@gmail.com>
Thu, 7 May 2015 15:06:32 +0000 (23:06 +0800)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 7 May 2015 19:56:14 +0000 (15:56 -0400)
If CSD is enabled with shadow even though it "shouldn't"*, the width
should still be calculated correctly. This fixes a regression caused by
b1e5ad469c753ea3eed967056ca814ecb0117c7b.

* gtk_window_should_use_csd () returns false

https://bugzilla.gnome.org/show_bug.cgi?id=748615

gtk/gtkwindow.c

index 2a85f1f24528f4385ab93749d9a8b230ea8d2a65..2a05c832d6a753d4891c8a24b79ac273299a3b35 100644 (file)
@@ -6542,7 +6542,7 @@ get_shadow_width (GtkWidget *widget,
   *shadow_width = border;
 
   if (!priv->decorated ||
-      !gtk_window_should_use_csd (window) ||
+      (!gtk_window_should_use_csd (window) && !priv->client_decorated) ||
       !gtk_window_supports_client_shadow (window))
     return;